<?php

use Illuminate\Http\Request;
use App\Http\Middleware\CheckApiBuyer;
/*
|--------------------------------------------------------------------------
| API Routes
|--------------------------------------------------------------------------
|
| Here is where you can register API routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| is assigned the "api" middleware group. Enjoy building your API!
|
*/


Route::namespace('Api')->group(function(){

	Route::post('get-openid','IndexController@getOpenid');
	
	Route::prefix('billboard')->group(function(){
		Route::any('index','BillboardController@index');
		
		Route::any('show','BillboardController@show');
	});

	Route::prefix('banner')->group(function(){
		Route::post('list','BannerController@index');	
		Route::post('show','BannerController@show');
	});
	
	
	Route::post('company','CompanyController@info');	
		
		Route::middleware('auth:api')->group(function(){	

	});

	
	Route::prefix('user')->group(function(){
		Route::post('billboard/index','UserBillboardController@index');
		Route::post('billboard/show', 'UserBillboardController@show');
		Route::post('billboard/save', 'UserBillboardController@save');
		Route::post('billboard/update','UserBillboardController@update');
		Route::post('billboard/del',  'UserBillboardController@del');
	});		
		

	
	
});
